<style rel="stylesheet/scss" lang="scss" scoped>
	.el-merchant-box {
		width: 100%;
		height: 825px;
		padding: 20px;
		overflow: auto;
		box-sizing: border-box;

		.box-flex {
			display: flex;
			margin-bottom: 10px;
		}

		.w-span {
			min-width: 160px;
			line-height: 40px;
			display: inline-block;
		}

		.l-radio {
			line-height: 40px;
			;
		}

		.pri-btn {
			margin: 0 auto;
		}
	}
</style>
<template>
	<div class="el-merchant-box">
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">公众号APPID</span>
				<el-input placeholder="请输入内容" clearable v-model="info.publisherAppId"></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">公众号APPsecret</span>
				<el-input placeholder="请输入内容" clearable v-model="info.publisherAppSecret "></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">小程序APPID</span>
				<el-input placeholder="请输入内容" clearable v-model="info.miniProgramAppId"></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">小程序APPsecret</span>
				<el-input placeholder="请输入内容" clearable v-model="info.miniProgramAppSecret"></el-input>
			</el-col>
		</el-row>
		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">微信商户平台号</span>
				<el-input placeholder="请输入内容" clearable v-model="info.merchantPlatformId"></el-input>
			</el-col>
		</el-row>

		<el-row class=" box-flex">
			<el-col :span="12" class="box-flex m-l-10">
				<span class="w-span">商户平台APlkey</span>
				<el-input placeholder="请输入内容" clearable v-model="info.merchantPlatformApiKey"></el-input>
			</el-col>
		</el-row>
		<el-row class="box-flex">
			<!--<el-button type="primary" class="pri-btn" @click="subWxInfo">保存</el-button>-->
		</el-row>
	</div>
</template>
<script>
	export default {
		props: {
			merchantInfo: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {
				info: {
					publisherAppId: '',
					publisherAppSecret : '',
					miniProgramAppId : '',
					miniProgramAppSecret: '',
					merchantPlatformId: '',
					merchantPlatformApiKey: '',
				}
			}
		},
		created() {
			
			console.log(this.merchantInfo)
			if (this.merchantInfo ) {
				this.info.publisherAppId = this.merchantInfo.publisherAppId
				this.info.publisherAppSecret  = this.merchantInfo.publisherAppSecret 
				this.info.miniProgramAppId  = this.merchantInfo.miniProgramAppId 
				this.info.miniProgramAppSecret = this.merchantInfo.miniProgramAppSecret
				this.info.merchantPlatformId = this.merchantInfo.merchantPlatformId
				this.info.merchantPlatformApiKey = this.merchantInfo.merchantPlatformApiKey

			}
		},
		methods: {
			subWxInfo() {
				this.$emit('subWxInfo', this.info)
			}
		}
	}
</script>
